Skip to content

Don't stop on breakpoints when running the swift Object Description function #10693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jimingham
Copy link

The Swift object description expression was being run without setting "IgnoreBreakpointsInExpressions", so it was stopping on breakpoints. That's not how the ObjC object description is run, and is not what people expect here.

I added the setting to the options in the Swift case, and added a test that we don't stop on breakpoints in the Object Description expression.

rdar://150698964

setting "IgnoreBreakpointsInExpressions", so it was stopping on
breakpoints.  That's not how the ObjC object description is run,
and is not what people expect here.

I added the setting to the options in the Swift case, and added a
test that we don't stop on breakpoints in the Object Description
expression.
@jimingham jimingham requested a review from a team as a code owner May 15, 2025 20:47
Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adrian-prantl
Copy link

@swift-ci test

@adrian-prantl
Copy link

@swift-ci test windows

@adrian-prantl
Copy link

@jimingham Can add a skip on windows to the new test?

def test_value_types(self):
"""Test 'po' on a variety of value types with and without custom descriptions."""
self.build()
(_,_,_,_) = lldbutil.run_to_source_breakpoint(self, "Break here to run tests", lldb.SBFileSpec("main.swift"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(_,_,_,_) = lldbutil.run_to_source_breakpoint(self, "Break here to run tests", lldb.SBFileSpec("main.swift"))
lldbutil.run_to_source_breakpoint(self, "Break here to run tests", lldb.SBFileSpec("main.swift"))

@jimingham
Copy link
Author

Apparently inlined swift tests are skipped in a different way than normal API tests, and when switching from one to the other I didn't notice the @swifttest was missing. We don't currently run the swift tests on Windows (we don't actually know how to build the test binary there), and so the missing decorator meant we tried the new test on Windows which didn't go well.

@jimingham
Copy link
Author

@swift-ci please test

@adrian-prantl
Copy link

@swift-ci test linux

@adrian-prantl adrian-prantl merged commit d8693d3 into swiftlang:swift/release/6.2 May 20, 2025
3 checks passed
jimingham added a commit that referenced this pull request May 21, 2025
…unction (#10693)

* The Swift `object description` expression was being run without
setting "IgnoreBreakpointsInExpressions", so it was stopping on
breakpoints.  That's not how the ObjC object description is run,
and is not what people expect here.

I added the setting to the options in the Swift case, and added a
test that we don't stop on breakpoints in the Object Description
expression.

* Mark the tests as @swifttest and fix the test name.

(cherry picked from commit d8693d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants